// custom-tab-bar/index.js
Component({
  /**
   * Component properties
   */
  properties: {

  },

  /**
   * Component initial data
   */
  data: {
    selected: 0,
    list: [
      
      {
        "pagePath":"../home/home",
        "iconPath": "../icons/order.png",
        "selectedIconPath": "/icons/order-active.png",
        "text":"订单"
      },
      {
        "pagePath":"../me/me",
        "iconPath": "../icons/me.png",
        "selectedIconPath": "/icons/me-active.png",
        "text":"我的"
      }
    ]
  },

  /**
   * Component methods
   */
  methods: {


    switchTab: function(e) {
      
      const url = e.currentTarget.dataset.path;
      const index = e.currentTarget.dataset.index;
      wx.switchTab({
        url
      })
      
    }
  }
})
